import { createStore } from 'vuex'

const state = {
    counter: 0,
    age: 18,
    money: 100
}
const  mutations = {
  increment(state) {
    state.counter++
  }
}
const actions = {
  increment({commit, state}) {
    console.log(commit)
    console.log(state)
    commit('increment')
  }
}
export default createStore({
  state,
  mutations,
  actions
})